
<%= simple_form_for(@shipping, :html => {:multipart => true}) do |f| %>
  <%= f.error_notification %>
  <%= f.error_notification message: f.object.errors[:base].to_sentence if f.object.errors[:base].present? %>

<div class="row">	
	<div class="col-md-6">		
		<div class="form-group date optional form-group-valid">
			<label class="form-control-label date optional" for="shipping_date">发货日期</label><abbr title="required"> *</abbr>
			<div class="input-group">
				<input name="shipping[date]" class="form-control date-picker" id="shipping_date" type="text" data-date-format="yyyy-mm-dd" placeholder="yyyy-mm-dd" value=<%=@shipping.date %>>
				<span class="input-group-addon"> <i class="fa fa-calendar"></i> </span>
			</div>
		</div>
	</div>
	<div class="col-md-6">
		
	</div>
</div>

<div class="row">	
	<div class="col-md-6">
		<% if @order.present? %>
			<%= f.input :receiver, label: '收件人公司', input_html: {value: (@order.customer.name) }  %>
		<% else %>
			<%= f.input :receiver, label: '收件人公司'  %>
		<% end %>		
	</div>
	<div class="col-md-6">
		<%= f.input :receiver_address, label: '收件地址' %>
		
	</div>
</div>

<div class="row">	
	<div class="col-md-6">		
		<%= f.input :receiver_contact, label: '联系人' %>
	</div>
	<div class="col-md-6">
		<%= f.input :receiver_tel, label: '联系人电话' %>
	</div>
</div>

<div class="row">	
	<div class="col-md-6">
		<%= f.input :tracking, label: '物流单号' %>
	</div>
	<div class="col-md-6">
		<%= f.input :carrier, label: '物流公司' %>
	</div>
</div>



<div class="row">	
	<div class="col-md-6">
		<!-- <%= f.input :method,label: '物流方式' %> -->
		<%= f.collection_radio_buttons :method, [['快递','快递'],['物流','物流'],['配车','配车'],['自提','自提']], :first, :last,checked: '快递',item_wrapper_class: 'col-md-3 default', item_label_class: 'default' %>
	</div>
	<div class="col-md-6">
		
	</div>
</div>


<div class="row">	
	<div class="col-md-6">
		<%= f.input :weight,label: '重量(kg)' %>
	</div>
	<div class="col-md-6">
		<%= f.input :dimension, label: '尺寸(长*宽*高 mm)' %>
	</div>
</div>

<div class="row">	
	<div class="col-md-6">
		<%= f.input :price,label: '价格' %>
	</div>
	<div class="col-md-6">
		<%= f.input :comment , label: '备注' %>
	</div>
</div>
<div class="row">		
	<div class="col-md-6">
		<%= f.file_field :waybill_image, label: '上传运单' %>
	</div>
</div>
<% if @order.present? %>
<%= f.input :order_id, :input_html => { :value => @order.id}, as: :hidden  %>
<% end %>
<%= f.button :submit,'提交',class: "btn btn-blue btn-xs" %>



<% end %>


<script>
	//--Bootstrap Date Picker--
	$('.date-picker').datepicker(); 
</script>